Skip to content

rustc_middle::ty cleanups #144713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 31, 2025
Merged

Conversation

nnethercote
Copy link
Contributor

It's not used in `rustc_middle`, and `rustc_resolve` is a better place
for it.
It's not used in `rustc_middle`, and `rustc_trait_selection` is a better
place for it.
Next to all the other `EarlyParamRegion` pieces.
It's only used in `rustc_hir_typeck`.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

changes to the core type system

cc @compiler-errors, @lcnr

@compiler-errors
Copy link
Member

I think the title of 4c89022 needs to be fixed

It's only used in `rustc_infer`.
The fields are public, so this doesn't need a method, normal
deconstruction and/or field access is good enough.
It's identical to `TyCtxt::get_all_attrs` except it takes `DefId`
instead of `impl Into<DefIf>`.
It's only used in `rustc_hir_typeck`.
- Put them in the module that defines the type.
- Add some `WithCachedTypeInfo<T>` asserts for consistency.
@nnethercote nnethercote force-pushed the rustc_middle-ty-cleanups branch from 6150264 to 7aec38b Compare July 31, 2025 05:17
@nnethercote
Copy link
Contributor Author

I think the title of 4c89022 needs to be fixed

Done, thanks.

@lcnr
Copy link
Contributor

lcnr commented Jul 31, 2025

r? @lcnr

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 31, 2025

📌 Commit 7aec38b has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 31, 2025
bors added a commit that referenced this pull request Jul 31, 2025
Rollup of 3 pull requests

Successful merges:

 - #144657 (fix: Only "close the window" when its the last annotated file)
 - #144665 (Re-block SRoA on SIMD types)
 - #144713 (`rustc_middle::ty` cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 017586c into rust-lang:master Jul 31, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Jul 31, 2025
Rollup merge of #144713 - nnethercote:rustc_middle-ty-cleanups, r=lcnr

`rustc_middle::ty` cleanups

r? `@davidtwco`
@rustbot rustbot added this to the 1.90.0 milestone Jul 31, 2025
tautschnig added a commit to tautschnig/kani that referenced this pull request Aug 1, 2025
Relevant upstream PR:
- rust-lang/rust#144713 (`rustc_middle::ty`
  cleanups) (and specifically the commit Remove
  `TyCtxt::get_attrs_unchecked`. therein)

Resolves: model-checking#4260
github-merge-queue bot pushed a commit to model-checking/kani that referenced this pull request Aug 1, 2025
Relevant upstream PR:
- rust-lang/rust#144713 (`rustc_middle::ty`
cleanups) (and specifically the commit Remove
`TyCtxt::get_attrs_unchecked`. therein)

Resolves: #4260 

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
@nnethercote nnethercote deleted the rustc_middle-ty-cleanups branch August 4, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants